using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;

namespace Wrath.RuleForge
{
    public static class FormBroker
    {
        private static Dictionary<string, Form> forms;

        static FormBroker()
        {
            forms = new Dictionary<string,Form>();
        }

        public static void AddForm(string name, Form form)
        {
            forms.Add(name.ToLower(), form);
        }

        public static void RemoveForm(string name)
        {
            forms.Remove(name.ToLower());
        }

        public static Form GetForm(string name)
        {
            if (forms.ContainsKey(name.ToLower()))
                return forms[name.ToLower()];

            return null;
        }
    }
}
